﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>

<% WebApp.Models.Person me = (WebApp.Models.Person)ViewData["MyProfile"]; %>
<div class="accountControl">
    <div class="left">Goggle+</div>
<% if (me != null)
    {
%>
        <div class="right">
        <a href="<%= Url.Action("Index", "Profile") %>"><%=me.Name%></a>
        <!-- Redirect to logout page in the callback function -->
        <a onclick="FB.logout(loggedOut); return false;">Logout</a>
        </div>
<% 
    }
    else
    { 
        %>
        <div class="fb-login-button right">Login</div>
        <%
    } 
%>
    <div class="clear"></div>
</div>